import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import './assets/less/index.less'
import VueParticles from 'vue-particles'
import requestApi from './utils/api'
import hljs from 'highlight.js'


Vue.use(VueParticles)
Vue.use(requestApi)

Vue.config.productionTip = false

// #在main.js定义自定义指令 
Vue.directive('highlight',function (el) {
  let blocks = el.querySelectorAll('pre code');
  blocks.forEach((block)=>{
    hljs.highlightBlock(block)
  })
})

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
